<%--
  <p>51void.com</p>
  User: cjp
  Date: 2007-6-2
  Time: 7:56:45
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/common/taglib.jsp" %>
<html>
<head><title></title>
    <script type="text/javascript">
        function fastreply(subject) {
            $("#title").val(subject);
            $("#message").focus();
        }
    </script>
</head>
<body>
<div class="maintable"><br>

    <c:if test="${not empty actionBean.posts}">
        <div class="subtable nav" style="width:100%">
            <f:nav forumId="${actionBean.topic.forumId}" viewLastLink="true"/>&raquo;${actionBean.topic.title}
        </div>
    </c:if>
    <br></div>

<c:choose>
    <c:when test="${empty actionBean.posts and param.nextTopic!=null}">
        <div class="maintable">

            <div class="maintable">
                <div class="simpletable">
                    <div class="header" style="text-align: left">51forum 提示信息</div>
                    <div class="altbg1 bottom">

                        <br>没有比当前更早的主题，请返回。<br><br><a href="javascript:history.back()">[ 点击这里返回上一页 ]</a>
                        <br><br>

                    </div>
                </div>
            </div>
        </div>
    </c:when>
    <c:when test="${empty actionBean.posts and param.lastTopic!=null}">
        <div class="maintable">
            <div class="simpletable">
                <div class="header" style="text-align: left">外地人在北京 提示信息</div>
                <div class="altbg1 bottom">

                    <br>没有比当前更新的主题，请返回。<br><br><a href="javascript:history.back()">[ 点击这里返回上一页 ]</a>
                    <br><br>

                </div>
            </div>
        </div>
    </c:when>
    <c:otherwise>
        <div class="maintable">
            <table width="100%" cellspacing="0" cellpadding="0" align="center" style="clear: both;">
                <tr>
                    <td valign="bottom">
                        <div style="margin-bottom: 5px">
                            <a href="${ctx}/thread.do?tid=${actionBean.topic.id}&lastTopic"
                               style="font-weight: normal"> &lsaquo;&lsaquo;
                                上一主题</a> | <a href="${ctx}/thread.do?tid=${actionBean.topic.id}&nextTopic"
                                              style="font-weight: normal">下一主题 &rsaquo;&rsaquo;</a><br>
                        </div>
                    </td>
                    <td width="40%" align="right" valign="bottom">
                        <div class="right">&nbsp;<a
                                href="${ctx}/post.do?forumId=${actionBean.topic.forumId}&tid=${actionBean.topic.id}&postForm"><img
                                src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/reply.gif" border="0"
                                alt=""/></a></div>
                        <div id="newspecialheader" class="right"><a
                                href="${ctx}/post.do?newThreadForm&forumId=${actionBean.topic.forumId}"
                                ><img src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/newtopic.gif" border="0"
                                      alt=""/></a></div>
                    </td>
                </tr>
            </table>
        </div>
    </c:otherwise>
</c:choose>


<c:forEach items="${actionBean.posts.elements}" var="post" varStatus="status">
<c:set var="userGroup" value="${f:userGroup(post.authorId)}"></c:set>
<c:set var="poster" value="${f:user(post.authorId)}"></c:set>
<c:choose>
<c:when test="${status.index==0}">
<div class="maintable">
<div class="spaceborder" style="width: 100%; border-bottom: none">
    <table cellspacing="0" cellpadding="5" width="100%" align="center">
        <tr class="header">
            <td colspan="2" style="color: #333">
                <div class="right" style="font-weight: normal">
                    <a href="viewthread.php?action=printable&amp;tid=3" target="_blank">打印</a> |
                    <a href="misc.php?action=emailfriend&amp;tid=3">推荐</a> |
                    <a href="my.php?item=subscriptions&amp;subadd=3" id="ajax_subscription"
                       onclick="ajaxmenu(event, this.id)">订阅</a> |
                    <a href="my.php?item=favorites&amp;tid=3" id="ajax_favorite"
                       onclick="ajaxmenu(event, this.id)">收藏</a>
                    | <a href="misc.php?action=blog&amp;tid=3" id="ajax_blog"
                         onclick="ajaxmenu(event, this.id, 2000, 'changestatus', 0)">加入文集</a>
                    <script type="text/javascript">
                        function changestatus(obj) {
                            obj.innerHTML = obj.innerHTML == '从文集移除' ? '加入文集' : '从文集移除';
                        }
                    </script>
                </div>
                标题:
                    ${actionBean.topic.title}
            </td>
        </tr>
    </table>
</div>

<input type="hidden" name="formhash" value="00756f41">

<div class="spaceborder" style="width: 100%; margin-bottom: 4px;
 border-top: none
">
    <table cellspacing="0" cellpadding="5" width="100%" align="center" class="t_row">
        <tr style="height: 100%">
            <td width="18%" valign="top" class="t_user">


                <c:choose>
                    <c:when test="${post.authorId>0}">
                        <a name="pid4"></a> <a name="newpost"></a> <a
                    href="topicadmin.php?action=getip&amp;fid=2&amp;tid=3&amp;pid=4" id="ajax_getip_0"
                    onclick="ajaxmenu(event, this.id, 10000)"><img
                    src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/ip.gif" border="0" align="right"
                    alt="查看 IP"/></a>
                <a href="space-uid-1.html" target="_blank" class="bold">${post.authorName}</a>
                <br>
                        <div class="smalltxt">
                    ${userGroup.title}<br>
                    <br>
                    <table width="95%" border="0" cellspacing="0" cellpadding="0"
                           style="table-layout: fixed; overflow: hidden">
                        <tr>
                            <td align="center">
                                <div class="avatar" style="width:120px;">
                                    <img src="${f:photo(post.authorId)}" alt=""/>
                                </div>
                            </td>
                        </tr>
                    </table>
                    <br>
                    UID ${post.authorId}<br>
                    精华0<br>
                    积分 0<br>
                    帖子 3<br>
                    阅读权限 ${userGroup.readRights}<br>
                    注册 ${i:cnDate(poster.registerTime)}<br>
                    状态 <b><c:choose>
                <c:when test="${f:onlineStatus(post.authorId)==2}">
                    在线
                </c:when>
                <c:otherwise>
                    离线
                </c:otherwise>
            </c:choose></b>
                </div>
                    </c:when>
                    <c:otherwise>
                        <a name="pid4"></a> <a name="newpost"></a> <a
                    href="topicadmin.php?action=getip&amp;fid=2&amp;tid=3&amp;pid=4" id="ajax_getip_0"
                    onclick="ajaxmenu(event, this.id, 10000)"><img
                    src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/ip.gif" border="0" align="right"
                    alt="查看 IP"/></a>
                        <div class="smalltxt">
                    游客<br>
                    <table width="95%" border="0" cellspacing="0" cellpadding="0"
                           style="table-layout: fixed; overflow: hidden">
                        <tr>
                            <td align="center">
                                <div class="avatar" style="width:120px;">
                                    <img src="${f:photo(post.authorId)}" alt=""/> 
                                </div>
                            </td>
                        </tr>
                    </table>
                    <br>
                </div>
                    </c:otherwise>
                </c:choose>

            </td>
            <td width="82%" valign="top" style="padding: 0px">
                <table border="0" cellspacing="0" cellpadding="5" class="t_msg">
                    <tr>
                        <td>
                            <div>
                                <div class="right t_number"><a href="###" class="bold" title="复制帖子链接到剪贴板"
                                                               onclick="setcopy('http://51void.5d6d.com/viewthread.php?tid=3&amp;page=1#pid4', '已经复制到剪贴板')">#1</a>
                                </div>
                                <div style="padding-top: 5px;">
                                    发表于 ${i:cnTime(post.createTime)}&nbsp;
                                    <a href="profile-uid-1.html" target="_blank">资料</a>&nbsp;
                                    <a href="pm.php?action=send&amp;uid=1" target="_blank">短消息</a>&nbsp;
                                    <a href="memcp.php?action=buddylist&amp;newbuddyid=1&amp;buddysubmit=yes"
                                       target="_blank" id="ajax_buddy_0" onclick="ajaxmenu(event, this.id)">加为好友</a>&nbsp;
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top" class="line" height="100%" style="padding-top: 10px;">
                            <div style="float: right" align="right">
                                <a href="misc.php?action=viewratings&amp;tid=3&amp;pid=4" title="评分 0"></a>
                            </div>
                            <span class="bold">${post.title}</span><br><br>

                            <div id="message4" class="t_msgfont">${post.content}</div>
                            <br style="clear: both"><font style="color: #333; font: 12px Arial">
                        </font>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            &nbsp;<a href="${ctx}/post.do?pid=${post.id}&editPostForm">编辑</a>
                            &nbsp;<a
                                href="${ctx}/post.do?forumId=${post.forumId}&tid=${post.topicId}&qutoeId=${post.id}&qutoeForm">引用</a>
                            &nbsp;<a href="misc.php?action=report&amp;fid=2&amp;tid=3&amp;pid=4&amp;page=1">报告</a>
                            &nbsp;<a href="misc.php?action=rate&amp;tid=3&amp;pid=4&amp;page=1">评分</a>
                            <a href="###"
                               onclick="fastreply('回复 #1 cjp472 的帖子')">回复</a>
                            <a href="###" onclick="scroll(0,0)"><img
                                    src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/top.gif" border="0"
                                    alt="顶部"/></a>
                            <input class="checkbox" type="checkbox" disabled>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>
</c:when>
<c:otherwise>
<div class="spaceborder" style="width: 100%; margin-bottom: 4px;">
<table cellspacing="0" cellpadding="5" width="100%" align="center" class="t_row">
<tr style="height: 100%">
<td width="18%" valign="top" class="t_user">


    <div class="smalltxt">
        <c:choose>
            <c:when test="${post.authorId==0}">
                <a name="pid5"></a> <a name="lastpost"></a><a
                    href="topicadmin.php?action=getip&amp;fid=2&amp;tid=3&amp;pid=5" id="ajax_getip_1"
                    onclick="ajaxmenu(event, this.id, 10000)"><img
                    src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/ip.gif" border="0" align="right"
                    alt="查看 IP"/></a>
                游客
                <br>
                <table width="95%" border="0" cellspacing="0" cellpadding="0"
                       style="table-layout: fixed; overflow: hidden">
                    <tr>
                        <td align="center">
                            <div class="avatar" style="width:120px;">
                                <img src="${f:photo(post.authorId)}" alt=""/>
                            </div>
                        </td>
                    </tr>
                </table>
                <br>
            </c:when>
            <c:otherwise>
                <a name="pid5"></a> <a name="lastpost"></a><a
                    href="topicadmin.php?action=getip&amp;fid=2&amp;tid=3&amp;pid=5" id="ajax_getip_1"
                    onclick="ajaxmenu(event, this.id, 10000)"><img
                    src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/ip.gif" border="0" align="right"
                    alt="查看 IP"/></a>
                <a href="space-uid-1.html" target="_blank" class="bold">${post.authorName}</a>
                <br>
                ${userGroup.title}<br>
               <%-- <img src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/star_level3.gif"
                     alt="Rank: 9"/><img
                    src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/star_level3.gif" alt="Rank: 9"/><img
                    src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/star_level1.gif" alt="Rank: 9"/><br>
                <br>--%>
                <table width="95%" border="0" cellspacing="0" cellpadding="0"
                       style="table-layout: fixed; overflow: hidden">
                    <tr>
                        <td align="center">
                            <div class="avatar" style="width:120px;">
                                <img src="${f:photo(post.authorId)}" alt=""/>
                            </div>
                        </td>
                    </tr>
                </table>
                <br>
                UID ${post.authorId}<br>
                精华
                0<br>
                积分 0<br>
                帖子 3<br>
                阅读权限 ${userGroup.readRights}<br>
                注册 ${i:cnDate(poster.registerTime)}<br>
                状态 <b>
                <c:choose>
                <c:when test="${f:onlineStatus(post.authorId)==2}">
                    在线
                </c:when>
                <c:otherwise>
                    离线
                </c:otherwise>
            </c:choose>
                </b>
            </c:otherwise>
        </c:choose>

    </div>
</td>
<td width="82%" valign="top" style="padding: 0px">
    <table border="0" cellspacing="0" cellpadding="5" class="t_msg">
        <tr>
            <td>
                <div>
                    <div class="right t_number"><a href="###" class="bold" title="复制帖子链接到剪贴板"
                                                   onclick="setcopy('http://51void.5d6d.com/viewthread.php?tid=3&amp;page=1#pid5', '已经复制到剪贴板')">#2</a>
                    </div>
                    <div style="padding-top: 5px;">
                        发表于 ${i:cnTime(post.createTime)}&nbsp;
                        <a href="profile-uid-1.html" target="_blank">资料</a>&nbsp;
                        <a href="space-uid-1.html" target="_blank" title="cjp472的个人空间">
                            个人空间</a>&nbsp;
                        <a href="pm.php?action=send&amp;uid=1" target="_blank">短消息</a>&nbsp;
                        <a href="memcp.php?action=buddylist&amp;newbuddyid=1&amp;buddysubmit=yes"
                           target="_blank" id="ajax_buddy_1" onclick="ajaxmenu(event, this.id)">加为好友</a>&nbsp;
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td valign="top" class="line" height="100%" style="padding-top: 10px;">
                <div style="float: right" align="right">
                    <a href="misc.php?action=viewratings&amp;tid=3&amp;pid=5" title="评分 0"></a>
                </div>
                <span class="bold">${post.title}</span><br><br>

                <div id="message5" class="t_msgfont">${post.content}</div>
                <br style="clear: both"><font style="color: #333; font: 12px Arial">
            </font>
            </td>
        </tr>
        <tr>
            <td align="right">
                &nbsp;<a href="${ctx}/post.do?pid=${post.id}&editPostForm">编辑</a>
                &nbsp;<a
                    href="${ctx}/post.do?forumId=${post.forumId}&tid=${post.topicId}&qutoeId=${post.id}&qutoeForm">引用</a>
                &nbsp;<a href="misc.php?action=report&amp;fid=2&amp;tid=3&amp;pid=5&amp;page=1">报告</a>
                &nbsp;<a href="misc.php?action=rate&amp;tid=3&amp;pid=5&amp;page=1">评分</a>
                <a href="###"
                   onclick="fastreply('回复 #2 cjp472 的帖子')">回复</a>
                <a href="###" onclick="scroll(0,0)"><img
                        src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/top.gif" border="0"
                        alt="顶部"/></a>
                <input class="checkbox" type="checkbox" name="delete[]" value="5">
            </td>
        </tr>
    </table>
</td>
</tr>
</table>
</div>
</c:otherwise>
</c:choose>


</c:forEach>

<c:if test="${not empty actionBean.posts}">
    <div class="maintable" style="clear:both">
        <table width="100%" cellspacing="0" cellpadding="0" align="center">
            <tr>
                <td valign="top"></td>
                <td width="40%" align="right">
                <div class="right">&nbsp;<a
                        href="${ctx}/post.do?forumId=${actionBean.topic.forumId}&tid=${actionBean.topic.id}&postForm"><img
                        src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/reply.gif" border="0" alt=""/></a></div>
                <div id="newspecialfooter" class="right"><a
                        href="${ctx}/post.do?newThreadForm&forumId=${actionBean.topic.forumId}"><img
                        src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/newtopic.gif" border="0" alt=""/></a>
                </div>
        </table>
        <br></div>


    <s:form method="post" id="postform" action="/post.do">
        <input type="hidden" name="formhash" value="00756f41">

        <div class="maintable">
            <div class="spaceborder" style="width: 100%">
                <table cellspacing="0" cellpadding="5" width="100%" align="center">
                    <tr>
                        <td colspan="3" class="header"><a
                                href="member.php?action=credits&amp;view=forum_reply&amp;fid=2"
                                target="_blank"><img
                                src="http://images.5d6d.com/cusimg/ea/redstone/X3nh3gor/credits.gif" alt="查看积分策略说明"
                                align="right" border="0"/></a>快速回复主题
                        </td>
                    </tr>
                    <tr>
                        <td width="18%" class="altbg1">&nbsp;<span class="bold">选项</span></td>
                        <td width="6%" class="altbg2" align="center"><span class="bold">标题</span></td>
                        <td width="59%" class="altbg2"><input type="text" name="post.title" style="width:60%" value=""
                                                              id="title"
                                                              tabindex="1"></td>
                    </tr>
                    <tr class="bottom">
                        <td width="18%" class="altbg1" valign="top">
                            <input class="checkbox" type="checkbox" name="parseurloff" value="1"> 禁用 URL 识别<br>
                            <input class="checkbox" type="checkbox" name="smileyoff" value="1"> 禁用 <a
                                href="faq.php?action=message&amp;id=32" target="_blank">Smilies</a><br>
                            <input class="checkbox" type="checkbox" name="bbcodeoff" value="1"> 禁用 <a
                                href="faq.php?action=message&amp;id=18" target="_blank">Discuz!代码</a><br>
                            <input class="checkbox" type="checkbox" name="isanonymous" value="1"> 使用匿名发帖<br>
                            <input class="checkbox" type="checkbox" name="usesig" value="1"> 使用个人签名<br>
                            <input class="checkbox" type="checkbox" name="emailnotify" value="1"> 接收新回复邮件通知
                        </td>
                        <td width="6%" class="altbg2" align="center" valign="top"><span class="bold">内容</span></td>
                        <td width="59%" class="altbg2" valign="top">
                            <div style="width: 97%" class="smalltxt" align="right">
                                <textarea rows="7" cols="10" name="post.content" id="message" class="autosave"
                                          style="width: 100%; height: 120px; word-break: break-all"
                                          onKeyDown="ctlent(event);" tabindex="2"></textarea><br><br>

                                <div class="left">
                                    <input type="hidden" name="post.topicId" value="${actionBean.topic.id}"/>
                                    <input type="hidden" name="post.forumId" value="${actionBean.topic.forumId}"/>
                                    <input class="button" type="submit" name="doPost" id="postsubmit" value="发表帖子"
                                           tabindex="3" title="[完成后可按 Ctrl+Enter 发布]">
                                </div>
                                <input type="submit" name="previewpost" class="lightbutton" value="预览帖子" tabindex="4">
                                <input type="button" class="lightbutton" name="restoredata" id="restoredata"
                                       value="恢复数据"
                                       tabindex="5" title="恢复上次自动保存的数据" onclick="loadData()">
                                <input type="reset" name="topicsreset" class="lightbutton" value="清空内容" tabindex="6">
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <br></div>
    </s:form>
    <div class="maintable">
        <div class="subtable option">
            <div style="margin: 6px">
                <div class="right smalltxt">
                    <span class="bold">管理选项:</span>
                    <select name="action" id="action">
                        <option value="" selected>管理选项</option>
                        <option value="delpost">删除回帖</option>
                        <option value="delete">删除主题</option>
                        <option value="close">关闭主题</option>
                        <option value="move">移动主题</option>
                        <option value="copy">复制主题</option>
                        <option value="highlight">高亮显示</option>
                        <option value="type">主题分类</option>
                        <option value="digest">设置精华</option>
                        <option value="stick">主题置顶</option>
                        <option value="split">分割主题</option>
                        <option value="merge">合并主题</option>
                        <option value="bump">提升主题</option>
                        <option value="repair">修复主题</option>
                    </select>
                </div>
<span class="smalltxt">
</span></div>
        </div>
        <br>
        <br>
    </div>
</c:if>
</body>
</html>
